package com.newsee.remote.sapcenter.controller;


import com.newsee.remote.common.dto.costcenter.CostCenterDTO;
import com.newsee.remote.common.vo.costcenter.CostCenterVO;
import com.newsee.remote.sapcenter.service.IShSapcostcenterService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 组织架构前端控制器（废弃）
 * </p>
 *
 * @author liangzhichen
 * @since 2019-11-05
 */
@Slf4j
@RestController
@RequestMapping("/sap/center")
public class ShSapcostcenterController {

    private final IShSapcostcenterService iShSapcostcenterService;

    public ShSapcostcenterController(IShSapcostcenterService iShSapcostcenterService) {
        this.iShSapcostcenterService = iShSapcostcenterService;
    }

    @ApiOperation(value = "接收组织架构数据接口")
    @PostMapping
    public CostCenterVO acceptSapCenter(@RequestBody CostCenterDTO centerDTO) {
        log.info("接收组织架构数据接口信息：" + centerDTO.toString());
        return iShSapcostcenterService.acceptSapCenter(centerDTO);
    }

}
